<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title></title>
</head>

<body>
<script type="text/javascript">
var arr=new Array(1,2,3,4,5,6);
document.write("原数组："+arr+"<br>");
document.write("数组中第2个到倒数第2个元素："+arr.slice(1,-1));
</script>
</table>
</body>
</html>
